<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>延边州住房公积金网上营业厅</title>
    <link rel="stylesheet" href="layui/css/layui.css"/>
    <link rel="stylesheet" href="css/admin.css"/>
	<style>html{background-image: url(img/bg.png);}</style>
</head>
<body>
    <div class="admin-login">
		<fieldset class="layui-elem-field">
			<legend>管理员登录</legend>
			<form class="layui-form layui-form-pane" method="post" action="">
				<div class="layui-form-item">
					<label class="layui-form-label">账号</label>
					<div class="layui-input-block">
						<input type="text" name="name" autocomplete="off" placeholder="请输入管理员账号" class="layui-input" lay-verify="required|name">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">密码</label>
					<div class="layui-input-block">
						<input type="password" name="password" autocomplete="off" placeholder="请输入管理员密码" class="layui-input" lay-verify="required|password">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">验证码</label>
					<div class="layui-input-inline input-code">
						<input type="text" name="code" autocomplete="off" placeholder="请输入验证码" class="layui-input" lay-verify="required|number|code">
					</div>
					<div class="layui-input-inline code">
						<div><img src="img/code.png" alt="验证码"/></div>
					</div>
				</div>
				<div class="layui-form-item submit-login">
					<button class="layui-btn layui-btn-radius" lay-submit lay-filter="login">确认登录</button>
				</div>
			</form>
		</fieldset>
	</div>

    <script type="text/javascript" src="layui/layui.js"></script>
    <script type="text/javascript">
		layui.use(['form'],function(){
			var $ = layui.jquery;
			var form = layui.form();
			form.verify({
				name: function(value){
					if(value.length < 5){
						return '管理员账号长度不低于5个字符';
					}
				},
				password: [/(.+){6,}$/, '密码长度不能少于6位'],
				code: function(value){
					if(value.length != 4){
						return '请输入4位数字验证码';
					}
				}
			});
			form.on('submit(login)', function(data){
				var formData = sczw.getFormData($(data.elem).parents("form"));
				sczw.layerSubmit("<{:url('index')}>",formData);
				return false
			})
		})
	</script>
</body>
</html>